package org.tea.inventory.domain.tea;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.util.Date;

/**
 * 仓库库存对象 warehouse_inventory
 * 
 * @author dongxb
 * @date 2025-04-16
 */
@ApiModel(value = "仓库库存对象")
@Data
@NoArgsConstructor
public class WarehouseInventory implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 仓库id */
    @ApiModelProperty(value = "仓库id")
    private Long warehouseId;

    /** 商品id */
    @ApiModelProperty(value = "商品id")
    private Long productId;
    private String productName;

    /** 当前库存量 */
    @ApiModelProperty(value = "当前库存量")
    private Long productNumber;

    /** 拓展字段，可用可不用。 仓库状态：0启用，1停用 */
    @ApiModelProperty(value = "拓展字段，可用可不用。 仓库状态：0启用，1停用")
    private Integer status;

    /** 是否删除：0未删除，1已删除 */
    @ApiModelProperty(value = "是否删除： 0未删除，1已删除")
    private Integer delFlag;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createDate;

    /** 创建者 */
    @ApiModelProperty(value = "创建者")
    private String createUserId;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateDate;

    /** 更新者 */
    @ApiModelProperty(value = "更新者")
    private String updateUserId;
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("warehouseId", getWarehouseId())
            .append("productId", getProductId())
            .append("productNumber", getProductNumber())
            .append("status", getStatus())
            .append("createDate", getCreateDate())
            .append("createUserId", getCreateUserId())
            .append("updateDate", getUpdateDate())
            .append("updateUserId", getUpdateUserId())
            .toString();
    }
    public WarehouseInventory(Long warehouseId,Long productId,Long productNumber,Date createDate){
        this.warehouseId=warehouseId;
        this.productId=productId;
        this.productNumber=productNumber;
        this.createDate=createDate;

    }
}
